function keyDown(e){
    var currKey=0, e=e||event||window.event;
    currKey = e.keyCode||e.which||e.charCode;
    if(currKey === 83 && (e.ctrlKey||e.metaKey)){

        window.api.saveData(getData())
        return false;
    }
    return true
}

function getData(){
    const textarea=document.getElementById("app-textarea")
    return textarea.value
}
document.onkeydown = keyDown;